package com.wc.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wc.api.UserService;
import com.wc.mapper.UserMapper;
import com.wc.model.User;

@Service("userService")
public class UserServiceImpl implements UserService {
	@Autowired
	private UserMapper userMapper;
	
	@Override
	public Boolean addUser(User user) {
		int ret=userMapper.insert(user);
		if(ret>0){
			return true;
		}else{
			return false;
		}
		
	}

	@Override
	public User findUserByEmail(String email) {
		User user=userMapper.selectByEmail(email);
		return user;
	}

}
